package com.amoyt.project.exception.enums;

import com.amoyt.project.exception.BaseException;

/**
 * @Description: 业务异常枚举类 （枚举，可添加）
 */
public enum BusinessExceptionEnum implements BaseException {
    PARAM_ERROR(100001,"参数异常"),
    TOKEN_ERROR(100002,"用户token异常"),
    //权限异常
    PERMISSION_ERROR(100003,"权限异常");
    /**
     * 错误码
     */
    private int errorCode;

    /**
     * 错误信息
     */
    private String errorMsg;
    BusinessExceptionEnum(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public int getErrorCode() {
        return errorCode;
    }

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }
}
